-- GENERATED SPELL FOR [Bog Giant] --


function spell0_17723(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_17723', 623, 1)
end

function spell1_17723(pUnit, Event) --@Fungal Decay,n/a--
pUnit:FullCastSpellOnTarget(32065,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17723', 18000, 1)
end

function spell2_17723(pUnit, Event) --@Growth,Self--
pUnit:FullCastSpellOnTarget(40318,pUnit)
pUnit:RegisterEvent('Sorts_17723', 685, 1)
end

function spell3_17723(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(15550,pUnit)
pUnit:RegisterEvent('Sorts_17723', 660, 1)
end

function Sorts_17723(pUnit, Event)
local choix_sorts_17723 = math.random(0, 3)
if choix_sorts_17723 == 0 then
pUnit:RegisterEvent('spell0_17723', 1, 1)
end
if choix_sorts_17723 == 1 then
pUnit:RegisterEvent('spell1_17723', 1, 1)
end
if choix_sorts_17723 == 2 then
pUnit:RegisterEvent('spell2_17723', 1, 1)
end
if choix_sorts_17723 == 3 then
pUnit:RegisterEvent('spell3_17723', 1, 1)
end
end

function mob17723_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17723', math.random(1500, 3000), 1)
end

function mob17723_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17723_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17723_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17723, 1, 'mob17723_Action')
RegisterUnitEvent(17723, 2, 'mob17723_Leave')
RegisterUnitEvent(17723, 3, 'mob17723_Kill')
RegisterUnitEvent(17723, 4, 'mob17723_Die')
